package teaching.io.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * 员工类。
 *
 * @author deng.zhao
 * @version 1.0 2018/04/03
 */
public class Employee implements Serializable {
	// 版本序号；
	private static final long serialVersionUID = -1505362822249824792L;
	// 编号；
	private int id;
	// 姓名；
	private String name;
	// 薪金；
	private double salary;
	// 雇佣日期；
	private Date hireDate;

	/**
	 * 无参构造方法。
	 */
	public Employee() {
		this(0, "", 0.0d, new Date());
	}

	/**
	 * 有参构造方法。
	 *
	 * @param id
	 *            编号；
	 * @param name
	 *            姓名；
	 * @param salary
	 *            薪金；
	 * @param hireDate
	 *            雇佣日期；
	 */
	public Employee(final int id, final String name, final double salary, final Date hireDate) {
		super();
		this.id = id;
		this.name = name;
		this.salary = salary;
		this.hireDate = hireDate;
	}

	public final int getId() {
		return id;
	}

	public final void setId(final int id) {
		this.id = id;
	}

	public final String getName() {
		return name;
	}

	public final void setName(final String name) {
		this.name = name;
	}

	public final double getSalary() {
		return salary;
	}

	public final void setSalary(final double salary) {
		this.salary = salary;
	}

	public final Date getHireDate() {
		return hireDate;
	}

	public final void setHireDate(final Date hireDate) {
		this.hireDate = hireDate;
	}

	@Override
	public final String toString() {
		return "Employee [id=" + id + ", name=" + name + ", salary=" + salary + ", hireDate=" + hireDate + "]";
	}

}
